<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/finance/cw_yszk_view/cw_yszk_view.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/finance/cw_yszk_view/cw_yszk_view.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '应收账款',
                name: 'cw_yszk_view/cw_yszk_view',
                url: "/cw_yszk_view/",
                sortName: "duedate,trackname"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"duedate":"","trackname":""});
            const searchFormOptions = ref([[{"title":"应收日期","field":"duedate","type":"month"},{"dataKey":"cw_yszk_trackname_all","data":[],"title":"赛道","field":"trackname","type":"select"}]]);
            const columns = ref([{field:'duedate',title:'应收日期',type:'string',sort:true,width:110,align:'left',sort:true},
                       {field:'trackname',title:'赛道',type:'string',bind:{ key:'cw_yszk_trackname_all',data:[]},sort:true,width:220,align:'left'},
                       {field:'unit',title:'单位',type:'string',width:110,require:true,align:'left'},
                       {field:'personliable',title:'责任人',type:'string',sort:true,width:220,align:'left'},
                       {field:'yearearly',title:'年初应收',type:'string',width:110,require:true,align:'left'},
                       {field:'stockCategory',title:'存量',type:'decimal',width:110,align:'left'},
                       {field:'newinvoicereceivable',title:'新增应收开票',type:'decimal',width:110,align:'left'},
                       {field:'newreceivablepad',title:'新增应收代垫',type:'decimal',width:110,align:'left'},
                       {field:'addCategory',title:'新增应收',type:'decimal',width:110,align:'left'},
                       {field:'totalCategory',title:'应收合计',type:'decimal',width:110,align:'left'},
                       {field:'lastmonthstock',title:'上月存量',type:'decimal',width:110,align:'left'},
                       {field:'stockchange',title:'存量环比变动',type:'string',width:120,align:'left'},
                       {field:'newsaletax',title:'新增含税销售额',type:'string',width:110,require:true,align:'left'},
                       {field:'newsalerate',title:'新增销售回款率',type:'string',width:110,require:true,align:'left'},
                       {field:'yearoverdue',title:'年初逾期',type:'string',width:110,require:true,align:'left'},
                       {field:'stockIsOverdue',title:'存量逾期',type:'decimal',width:110,align:'left'},
                       {field:'stockIsOverdueCushionCushionType',title:'新增逾期开票',type:'decimal',width:110,align:'left'},
                       {field:'stockIsOverdueCushionCushionType1',title:'新增逾期保税仓代垫',type:'decimal',width:110,align:'left'},
                       {field:'stockIsOverdueCushionCushionType2',title:'新增逾期终端代垫',type:'decimal',width:110,align:'left'},
                       {field:'total',title:'逾期合计',type:'decimal',width:110,align:'left'},
                       {field:'lastmonthoverdue',title:'上月逾期',type:'decimal',width:110,align:'left'},
                       {field:'newoverduereson',title:'新增逾期原因',type:'string',width:110,require:true,align:'left'},
                       {field:'solutionmeasure',title:'解决措施',type:'string',width:110,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
